<{if $setting.type != 2}><!--普通模式-->
<{if $setting.ad_margin != 0}>
<style>
<{if $setting.type==0}>
#qf_style_<{$widgets_id}> li{margin-bottom:<{$setting.ad_margin|default:'0'}>px}
#qf_style_<{$widgets_id}> li.last {margin-bottom:0}
<{elseif $setting.type==1}>
#qf_style_<{$widgets_id}> li{margin-right:<{$setting.ad_margin|default:'0'}>px}
#qf_style_<{$widgets_id}> li.last {margin-left:0}
<{/if}>
</style>
<{/if}>
<{if $setting.showtag}><div class="qf-ad-pic <{$setting.stylename}>">
    <{if $setting.title}>
    <div class="hd">
        <h3><{$setting.title}></h3>
    </div>
    <{/if}>
    <div class="bd<{if $setting.type==1}> class="clearfix"<{/if}>" id="qf_style_<{$widgets_id}>">
<{/if}>
<{if count($setting.ad) >0}>
<{assign var="do" value="1"}>
<{foreach from=$data.ad item=item key=key name=adlist}>
<div class="ad-pic fore<{$do}><{if $setting.type==1}> l<{/if}><{if $do % 2 ==0}> odd<{/if}>"><a href="<{$item.url}>" target="_blank"><img src="<{$data.theme_dir}>/images/i/transparent.gif" data-src="<{$item.pic|storager}>"<{if $item.width}> width="<{$item.width}>"<{/if}><{if $item.height}> height="<{$item.height}>"<{/if}> alt="<{$item.title}>" /><{if $setting.showtxt}><p><{$item.title}></p><{/if}></a>
</div>
<{assign var="do" value=$do+1}>
<{/foreach}>
<{/if}>	
<{if $setting.showtag}></div></div><{/if}>
<{else}>
<!--滚动模式-->
<style>
#qf_scroll_<{$widgets_id}>,
#qf_scroll_<{$widgets_id}> .slide-box {width:<{$setting.ad_width}>px;height:<{$setting.ad_height}>px;overflow:hidden;}
#qf_scroll_<{$widgets_id}> {position:relative;}
#qf_scroll_<{$widgets_id}> .slide-box li {width:325px;height:125px;overflow:hidden;}
#qf_scroll_<{$widgets_id}> .prev,
#qf_scroll_<{$widgets_id}> .next {position:absolute;font-size:16px;top:50%;width:20px;height:20px;margin-top:-10px;cursor:pointer}
#qf_scroll_<{$widgets_id}> .prev {left:0;}
#qf_scroll_<{$widgets_id}> .next {right:0}
#qf_scroll_<{$widgets_id}> .prev .icon,
#qf_scroll_<{$widgets_id}> .next .icon {color:#999;font-size:16px;display:block;}
</style>
<{if $setting.showtag}><div class="qf-ad-pic <{$setting.stylename}>"><{/if}>
<{if $setting.title}>
<div class="hd">
    <h3><{$setting.title}></h3>
</div>
<{/if}>
<{if count($setting.ad) >0}>
<div class="bd auto-bind-widget" id="qf_scroll_<{$widgets_id}>" data-widget-type="Slide" data-widget-config="{autoplay:true,effect:'<{$setting.effect|default:'scrollx'}>',hasTriggers:false,haslrbtn:true,isFloat:true,panels:'.slide-item',viewStep:<{$setting.viewnum}>}">
    <div class="slide-box">
        <ul class="switchable-content">
        <{foreach from=$data.ad item=item key=key name=adlist}>
        <li class="slide-item"><a href="<{$item.url}>" target="_blank"><img src="<{$data.theme_dir}>/images/i/transparent.gif" data-src="<{$item.pic|storager}>" alt="<{$item.title}>"<{if $item.width}> width="<{$item.width}>"<{/if}><{if $item.height}> height="<{$item.height}>"<{/if}> /><{if $setting.showtxt}><p><{$item.title}></p><{/if}></a></li>
        <{/foreach}>
        </ul>
    </div>
    <div class="prev l"><i class="icon">&#x26;</i></div>
    <div class="next r"><i class="icon">&#x27;</i></div>
</div>
<{/if}>
<{if $setting.showtag}></div><{/if}>
<{/if}>